<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('季度表列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:quarterly:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:quarterly:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:quarterly:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:quarterly:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
                <div>季度预算完成率 = 实际回款 / 预算金额</div>
                <div>季度预测完成率 = 实际回款 / 预测金额</div>
            </div>
            <!--<div>每季度预算：公司所有项目一季度预算汇总；每季度预测：公司所有项目一季度预测汇总（最新版本）；</div>-->
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:quarterly:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:quarterly:remove')}]];
        var prefix = ctx + "system/quarterly";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "季度表",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'principalName',
                    title : '负责人'
                },
                {
                    field : 'salesDepartmentTwo', 
                    title : '部门'
                },
                {
                    field : 'q1Budget', 
                    title : '一季度预算'
                },
                {
                    field : 'q1Predict', 
                    title : '一季度预测'
                },
                {
                    field : 'q1Actual', 
                    title : '一季度实际'
                },
                {
                    field : 'q1FinishrateB', 
                    title : '一季度预算完成率'
                },
                {
                    field : 'q1FinishrateP', 
                    title : '一季度预测完成率'
                },
                // {
                //     field : 'q1Remainsum',
                //     title : '一季度余额'
                // },
                    {
                        field : 'q2Budget',
                        title : '二季度预算'
                    },
                    {
                        field : 'q2Predict',
                        title : '二季度预测'
                    },
                    {
                        field : 'q2Actual',
                        title : '二季度实际'
                    },
                    {
                        field : 'q2FinishrateB',
                        title : '二季度预算完成率'
                    },
                    {
                        field : 'q2FinishrateP',
                        title : '二季度预测完成率'
                    },
                    // {
                    //     field : 'q2Remainsum',
                    //     title : '二季度余额'
                    // },
                    {
                        field : 'q3Budget',
                        title : '三季度预算'
                    },
                    {
                        field : 'q3Predict',
                        title : '三季度预测'
                    },
                    {
                        field : 'q3Actual',
                        title : '三季度实际'
                    },
                    {
                        field : 'q3FinishrateB',
                        title : '三季度预算完成率'
                    },
                    {
                        field : 'q3FinishrateP',
                        title : '三季度预测完成率'
                    },
                    // {
                    //     field : 'q3Remainsum',
                    //     title : '三季度余额'
                    // },
                    {
                        field : 'q4Budget',
                        title : '四季度预算'
                    },
                    {
                        field : 'q4Predict',
                        title : '四季度预测'
                    },
                    {
                        field : 'q4Actual',
                        title : '四季度实际'
                    },
                    {
                        field : 'q4FinishrateB',
                        title : '四季度预算完成率'
                    },
                    {
                        field : 'q4FinishrateP',
                        title : '四季度预测完成率'
                    }
                    // {
                    //     field : 'q4Remainsum',
                    //     title : '四季度余额'
                    // }
                ]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>